<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:directive.page import="com.lg.system.CTurnPage" />
<%@ include file="/jsp/jscommom.jsp"%>
<%@ include file="/jsp/admintop.jsp"%>

<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>用户管理</title>
		<link href="/css/login.css" rel="stylesheet" type="text/css" />
	</head>
	<script type="text/javascript">
function domethod(){
document.forms[0].submit();
}

function goto(url){
window.open(url,"_blank");
}
</script>
	<%
		CTurnPage mPage = new CTurnPage();
		mPage = (CTurnPage) request.getAttribute("page");
	%>
	<body>
		<html:form action="/system/admin/popedom/usermanage" method="post">
			<div align="center">
				<table width="97%" border="0" align="center" cellpadding="0"
					cellspacing="1" class="line1">
					<tr>
						<td class="titlebg" colspan="4">
							用户管理
						</td>
					</tr>

					<tr>
						<td class="mtdtitle1">
							用户名
						</td>
						<td class="mtdtextleft">
							<html:text property="name" styleClass="input1"></html:text>
						</td>

						<td class="mtdtitle1">
							类型
						</td>
						<td class="mtdtextleft">
							<html:select property="status" styleClass="input1">
								<option value="1">
									有效
								</option>
								<option value="0">
									无效
								</option>
							</html:select>
						</td>
					</tr>

					<tr>
						<td class="mtdtitle1">
							角色描述
						</td>
						<td colspan="3" class="mtdtextleft">
							<html:text property="roleDescript" styleClass="input1"></html:text>
						</td>


					</tr>

					<tr>
						<td class="mtdtitle1" colspan="4">
							<input value="查询" type="button" class="tbutton"
								onclick="domethod()" />
						</td>
					</tr>

					<tr>
						<td class="mtdtitle1" colspan="4">
							<table width="100%" border="0" align="center" cellpadding="0"
				cellspacing="1" class="line1">
								<tr>
									<td class="mtdtextleft" colspan="4">
										<input value="增加" type="button" class="tbutton"
											onclick="goto('/system/admin/popedom/adduser.jsp')" />
									</td>
								</tr>

								<tr>
									<td class="titlebg" colspan="4">
										用户列表
									</td>
								</tr>

								<tr>
									<td class="mtdtitle1">
										编号
									</td>
									<td class="mtdtitle1">
										用户名
									</td>
									<td class="mtdtitle1">
										角色描述
									</td>
									<td class="mtdtitle1">
										类型
									</td>
								</tr>

								<logic:empty name="page" property="sqlList">
									<tr>
										<td align="center" colspan="4">
											没有可显示的内容!

										</td>
									</tr>
								</logic:empty>
								<logic:notEmpty name="page" property="sqlList">
									<logic:iterate type="com.ibatis.po.system.TSysAdmin"
										id="userList" name="page" property="sqlList" indexId="index">
										<%
								if((index.intValue() + 1)%2==0){
								 %>
										<tr style="cursor:hand"
											onclick="goto('/system/admin/popedom/edituser.do?adminUserId=${userList.id }')">
											<td class="mtdtextcenterblue">
												${userList.id }
											</td>
											<td class="mtdtextcenterblue">
												${userList.name }
											</td>
											<td class="mtdtextcenterblue">
												${userList.roleDescript }
											</td>
											<td class="mtdtextcenterblue">
												<logic:equal value="0" name="userList" property="status">无效</logic:equal>
												<logic:equal value="1" name="userList" property="status">有效</logic:equal>

											</td>
										</tr>
										<%
								}else{
								 %>
								 <tr style="cursor:hand"
											onclick="goto('/system/admin/popedom/edituser.do?adminUserId=${userList.id }')">
											<td class="mtdtextcenterwrite">
												${userList.id }
											</td>
											<td class="mtdtextcenterwrite">
												${userList.name }
											</td>
											<td class="mtdtextcenterwrite">
												${userList.roleDescript }
											</td>
											<td class="mtdtextcenterwrite">
												<logic:equal value="0" name="userList" property="status">无效</logic:equal>
												<logic:equal value="1" name="userList" property="status">有效</logic:equal>

											</td>
										</tr>
										<%
								 }
								  %>
									</logic:iterate>
								</logic:notEmpty>
								<tr>
									<td colspan="4" class="mtdtitle1">
										<table width='100%'>
											<tr>
												<td class="left">
													<%=mPage.getPageInfo()%>
												</td>
												<td class="right">
													<%=mPage.getTurnPageLink()%>
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</div>
		</html:form>
	</body>
</html>
